package publics.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="enterprise_board")
public class EnterpriseBoard {//董事会
	
	 private Integer id;//ID  Integer  not null,
	 private Enterprise ent; 
	 private String name;//姓名       Variable characters(4)  not null,
	 private String post;// 职务   Variable characters(10)  not null,
	 private Integer age; //年龄      Integer 
	 private Integer education;//学历   Integer
	 private String title;// 职称   Variable characters(10)
	 private String compName;//目前所服务公司名称 Variable characters(40)
	 private String compTitle;// 目前所服务公司职务   Variable characters(10)
	 private Float stockPercentage;//个人持股比例（%）  Double  not null,
	 @Id
	 @GeneratedValue
	 @Column(name="Ent_board_id")
	public Integer getId() {
		return id;
	}
	 @ManyToOne(fetch=FetchType.LAZY)
	 @JoinColumn(name="Ent_id",nullable=false)
	public Enterprise getEnt() {
		return ent;
	}
	 @Column(name="Ent_board_name")
	public String getName() {
		return name;
	}
	 @Column(name="Ent_board_post")
	public String getPost() {
		return post;
	}
	 @Column(name="Ent_board_age")
	public Integer getAge() {
		return age;
	}
	 @Column(name="Ent_board_education")
	public Integer getEducation() {
		return education;
	}
	 @Column(name="Ent_board_title")
	public String getTitle() {
		return title;
	}
	 @Column(name="Ent_board_comp_name")
	public String getCompName() {
		return compName;
	}
	 @Column(name="Ent_board_comp_title")
	public String getCompTitle() {
		return compTitle;
	}
	 @Column(name="Ent_board_stock_percentage")
	public Float getStockPercentage() {
		return stockPercentage;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public void setEnt(Enterprise ent) {
		this.ent = ent;
	}
	public void setName(String name) {
		this.name = name;
	}
	public void setPost(String post) {
		this.post = post;
	}
	public void setAge(Integer age) {
		this.age = age;
	}
	public void setEducation(Integer education) {
		this.education = education;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public void setCompName(String compName) {
		this.compName = compName;
	}
	public void setCompTitle(String compTitle) {
		this.compTitle = compTitle;
	}
	public void setStockPercentage(Float stockPercentage) {
		this.stockPercentage = stockPercentage;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "EnterpriseBoard [age=" + age + ", compName=" + compName
				+ ", compTitle=" + compTitle + ", education=" + education
				+ ", ent=" + ent + ", id=" + id + ", name=" + name + ", post="
				+ post + ", stockPercentage=" + stockPercentage + ", title="
				+ title + "]";
	}
	
	   
}
